Skip to content

Modernize build: Go modules + current Go toolchain (1.0.1)#1

Merged
lvangool merged 1 commit into
masterfrom
hotfix/go-modules-modernization
Jun 16, 2026
Merged

Modernize build: Go modules + current Go toolchain (1.0.1)#1
lvangool merged 1 commit into
masterfrom
hotfix/go-modules-modernization

Conversation

@lvangool

Copy link
Copy Markdown
Member

Why

The shipped gotty binary is built with Go 1.7, which trips vulnerability scanners on the large set of Go-stdlib CVEs fixed since. This is the minimum change to get off the dead toolchain and onto Go modules built with a current Go — no rewrite, no behavior change. (Upstream yudai/gotty only moved on to an abandoned v2.0.0-alpha that changes the CLI/protocol and would break central's integration, so modernizing v1.0.0 in place is the right path.)

What changed

  • Go modules: go.mod/go.sum (module github.com/cloud66/gotty); removed Godeps/ and the pre-module vendor tree.
  • Dependency swaps: codegangsta/cliurfave/cli (v1, API-identical), kr/ptycreack/pty. Bumped gorilla/websocketv1.5.3 (fixes CVE-2020-27813).
  • Re-vendored via go mod vendor — the unmaintained orphan deps (braintree/manners, yudai/hcl, yudai/umutex) stay committed in-repo as a supply-chain safety net.
  • CI: replaced the defunct wercker.yml with GitHub Actions — ci.yml (gofmt + vet + build) and release.yml (on a v* tag, builds a static CGO-free gotty_linux_amd64_<ver>.tar.gz and attaches it to the Release; optional S3 upload when creds are configured).
  • Cleanup: dropped the libapps submodule (assets remain baked into the generated app/resource.go); small log/io modernizations; Version1.0.1.

Verification

  • go build / go vet / gofmt clean; binaries embed go1.26.3 (was go1.7).
  • Ran with central's exact launch flags under TLS — all accepted; static assets serve 200; auth_token.js keeps application/javascript.
  • Browser smoke test: the hterm terminal rendered relayed PTY output end-to-end with zero console errors (confirms the websocket + pty bumps work live).

Follow-ups (not in this repo)

  1. Publish gotty_linux_amd64_1_0_1.tar.gz to s3://downloads.cloud66.com/gotty/ (or wire the release.yml S3 secrets).
  2. Bump cloud66/central app/models/versions/gotty.rb VERSION_LATEST 1.0.01.0.1 so servers install the rebuilt binary.

Migrate off the dead Go 1.7 / godep / go-bindata toolchain to Go modules
built with a current Go, clearing the Go-stdlib CVEs flagged on the shipped
binary. v1.0.0 runtime behavior and CLI flags are unchanged.

- add go.mod/go.sum (module github.com/cloud66/gotty); drop Godeps/
- swap deprecated deps: codegangsta/cli -> urfave/cli (v1, API-compatible),
  kr/pty -> creack/pty; bump gorilla/websocket -> v1.5.3 (CVE-2020-27813)
- re-vendor with go mod vendor (keeps the unmaintained orphan deps in-repo)
- replace the dead wercker pipeline with GitHub Actions (ci + release);
  release builds a static linux/amd64 gotty_linux_amd64_<ver>.tar.gz
  matching cloud66/central's installer contract
- drop the libapps submodule; web assets stay baked in app/resource.go
- minor: log.Print for no-verb logs, os.ReadFile over deprecated io/ioutil
- bump Version 1.0.0 -> 1.0.1
@lvangool lvangool merged commit 00b96f8 into master Jun 16, 2026
1 check passed
@lvangool lvangool deleted the hotfix/go-modules-modernization branch June 16, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant